<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		var arr = [1,56,23,6,43,87,3,5,55];
		getmax(arr);
		getmin(arr);
		
		function getmax(getmax){
			var max  = getmax[0];
			for(var i=0;i<getmax.length;i++){
				if (getmax[i]>max) {
					max=getmax[i]
				};
			}
			document.write("最大值是："+max+"</br>");
		}
		function getmin(getmin){
			var min  = getmin[0];
			for(var i=0;i<getmin.length;i++){
				if (getmin[i]<min) {
					min=getmin[i]
				}
			}
			document.write("最小值是："+min);
		}
		
	</script>
</head>
<body>
	
</body>
</html>